﻿using System.Drawing;

namespace com.uplus.common
{
    /// <summary>
    /// 图片管理类
    /// @白毅, 2011-12-17
    /// </summary>
    public class ImageMgr
    {

        #region 生成图片缩略图
        /// <summary>
        /// 生成图片缩略图
        /// </summary>
        /// <param name="image">原始图片</param>
        /// <param name="x">宽度缩放系数</param>
        /// <param name="y">高度缩放系数</param>
        /// <returns>缩放后的图片</returns>
        //public static System.Drawing.Image ImageGenerate(Image image, int x, int y)
        //{
        //    Bitmap img = new Bitmap(image.Width / x, image.Height / y);
        //    Graphics gh = Graphics.FromImage(img);
        //    gh.DrawImage(image, 0, 0, img.Width, img.Height);
        //    return img;
        //}
        #endregion 

    }
}
